package experiment.controller;

import java.io.IOException;

import javax.servlet.http.HttpServletResponse;


import experiment.model.UserPOJO;
import experiment.service.UserServiceImpl;


public class UserController {
	
	private UserServiceImpl userServiceImpl;
	
	public String login( UserPOJO user, HttpServletResponse response) throws IOException {
		if(userServiceImpl.login(user)) {
			return "1";
		}else {
			return "2";
		}
	}
	
	public String register(UserPOJO user, HttpServletResponse response) throws IOException {
		if(userServiceImpl.register(user)) {
			return "1";
		}else {
			return "2";
		}
	}
	
}

